﻿<%@ Page Title="视频列表" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="VideoList.aspx.cs" Inherits="Xpus.YouYTube.WebSite.Views.Video.VideoList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% TVideo[] videos = (TVideo[])ViewData["Videos"]; %>
<% string listType = (string)ViewData["ListType"]; %>
<% string listBy = (string)ViewData["ListBy"]; %>
<% int pageIndex = (int)ViewData["PageIndex"]; %>
<% int pageSize = (int)ViewData["PageSize"]; %>
<% int totalPages = (int)ViewData["TotalPages"]; %>

<div class="box">
	<div class="bt"><%= listType %></div>
	<div class="bc">
<% for (int i = 0; i < videos.Length; i++) %>
<% { %>
	<% if (i == 10) %>
	<% { %>
		<div class="ad-c">
<script type="text/javascript"><!--
google_ad_client = "pub-0410788977836329";
/* 468x60, 创建于 08-6-5,yyt，首页栏目间 */
google_ad_slot = "2133264878";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
		</div>
		<hr />
	<% } %>

		<% TVideo v = videos[i]; %>
		<h2 class="VideoTitle"><a href="/Video/View/<%= v.Id %>/"><%= HttpUtility.HtmlEncode(v.Title)%></a></h2>
		<p class="des"><%= HttpUtility.HtmlEncode(v.Description.LimitLength(200))%></p>
		<p class="cmd">[<%= v.AddedTime.ToString("yyyy-MM-dd HH:mm:ss")%>] <%= v.AgreeNumber%>顶 <%= v.DisagreeNumber%>踩</p>
		<hr />
<% } %>
		<div class="vcp">
<% for(int i = 1; i <= totalPages; i++) %>
<% { %>
	<% if(pageIndex == i) %>
	<% { %>
		<span class="curp"><%= i %></span>
	<% } %>
	<% else %>
	<% { %>
		<span class="comp"><a href='<%= string.Format("/Video/List/{0}/{1}/{2}/", listBy, i, pageSize) %>'><%= i %></a></span>
	<% } %>
<% } %>
		</div>	
	</div>
</div>
</asp:Content>
